package com.hit.RuningGirl.sprite;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.physics.box2d.Body;
import com.hit.RuningGirl.main.Yelling;

public class Protagonist extends GameSprite {

	private int starsCoumt;

	private int allStarsCoumt;

	private Texture tex;

	private TextureAtlas texat;

	public Protagonist(Body body) {
		super(body);

		tex = Yelling.assetManager.get("images/girl.png", Texture.class);

		TextureRegion[] region = TextureRegion.split(tex,48,48)[0];



//		for (int i = 0 ; i < 8 ; i ++){
//			region[i] = spilt[i][0];
//		}

//		texat = assetManager.get("images/yellingman2.atlas");
//		TextureRegion[] region = new TextureRegion[5];
//		for (int i = 0 ; i < 5 ; i++){
//			region[i++] = texat.findRegion(""+i);
//		}

		setAnimation(region, 1 / 24f);

	}


	public void collectStars() {
		starsCoumt++;
	}


	public int getStarsCoumt() {
		return starsCoumt;
	}


	public int getAllStarsCoumt() {
		return allStarsCoumt;
	}


	public void setStarsCoumt(int starsCoumt) {
		this.starsCoumt = starsCoumt;
	}


	public void setAllStarsCoumt(int allStarsCoumt) {
		this.allStarsCoumt = allStarsCoumt;
	}

	public void resetStart(int allStarsCoumt) {
		this.starsCoumt = 0;
	}
}
